import { AuthenticationClient } from "authing";

export const getResumeAuthingSDK = (ac?: string) => {
  return new AuthenticationClient({
    appId: Deno.env.get("AUTHING_APP_ID")!,
    appHost: Deno.env.get("ADMIN_AUTHING_DOMAIN")!,
    appSecret: Deno.env.get("AUTHING_SECRET_KEY")!,
    // 很重要，这个错误，接口会直接返回400错误
    redirectUri: Deno.env.get("location") + "/admin/login",
    accessToken: ac,
  });
};
